{% extends "base_utf8.html" %}
{% block content %}
		<script type="text/javascript">
		function valdateGbook(thisform)
		{
			fields = new Array(thisform.name,thisform.content)
			alerttxts = new Array('请输入昵称','请填入留言内容')
			validate_submit(thisform, fields, alerttxts)
		}
		</script>

    <div class="rtml_features_box"> <img src="/staticfiles/images/rtml_features_box_left.gif" alt="" class="img_left">
    	<form name='guestbook' action='/gbook' method='post'>
	      <div class="rtml-features-tag"><a onclick="valdateGbook(document.guestbook)" >&nbsp;</a></div>
	      <img src="/staticfiles/images/rtml_features_box_divider.gif" alt="" class="rtml_features_box_divider"> <img src="/staticfiles/images/rtml_features_box_right.gif" alt="" class="img_right">
	      <div class="user_name"  onkeydown="if(event.keyCode==13)return false;">昵称: <input name="name" class="textbox" type="text"></div>
	      <div class="message">
	        <textarea name="content" class="area"></textarea>
	      </div>
			</form>
    </div>
    
    <!--留言列表--> 
    <div class="comments">
    	
    {% for fb in feedbacks %}
      {% if fb.name %}
      	<h2><b>{{fb.name}}</b> 于 <script language="JavaScript">document.write(toLocalTime({{fb.date|date:"Y, m, d,"}} {{fb.date|time:"H, i, s"}}))</script></h2>
      {% else %}
      	<h2>访客 于 <script language="JavaScript">document.write(toLocalTime({{fb.date|date:"Y, m, d,"}} {{fb.date|time:"H, i, s"}}))</script></h2>
      {% endif %}
      <div class="commentbody">
      	<!--div-->
		{{ fb.content|escape|linebreaks }}
		<!--/div-->
			</div>
		<div class='commentbottom'></div>
    {% endfor %}
    	
		{% if is_paginated %}
			<div class="commentpagenum">
			{% if has_previous %}
		    <a href="/gbook/page{{ previous_page }}"> <img src="/staticfiles/images/prevp.gif" alt="上一页" ></a>
		  {% endif %}
		  &nbsp&nbsp&nbsp&nbsp
		  {% if has_next %}
		    <a href="/gbook/page{{ next_page }}"><img src="/staticfiles/images/nextp.gif" alt="下一页" ></a>
		  {% endif %}
			</div>
		{% endif %}
		
		
		<!--div class="wp-pagenavi">
			<span class="pages">Page 1 of 4</span>
			<span class="current">1</span>
			<a href="http://www.smashingmagazine.com/category/graphics/page/2/" title="2">2</a>
			<a href="http://www.smashingmagazine.com/category/graphics/page/3/" title="3">3</a>
			<a href="http://www.smashingmagazine.com/category/graphics/page/4/" title="4">4</a>
			<a href="http://www.smashingmagazine.com/category/graphics/page/2/">Next »</a>
		</div-->

		
    </div>

{% endblock %}
